<template>
    <div class='table'>
        <div class="crumbs">
            <el-breadcrumb separator="/">
                <el-breadcrumb-item>
                  <span class="container-title-p">
                    权限管理
                    <i class="iconfont icon-jiantou"></i>
                  </span>
                  <span>管理员</span>
                  </el-breadcrumb-item>
            </el-breadcrumb>
        </div>
        <div class="u_list_item">  
            <el-button type="success" icon="plus" @click='addAdmins'><i class="iconfont icon-add-s" style="font-size:14px;margin-right:5px;"></i>添加权限菜单信息</el-button>
        </div>
        <el-dialog :visible.sync='addAdmin'>
            <el-form>
                <el-form-item label='图标：'>
                    <el-upload
                    class="avatar-uploader"
                    :show-file-list="true"
                    :action='""'
                    >
                    <i class="el-icon-plus avatar-uploader-icon"></i>
                    </el-upload>
                </el-form-item>
                <el-form-item label='名称：'>
                    <el-input placeholder="请输入名称"></el-input>
                </el-form-item>
                <el-form-item label='父标识：'>
                    <el-input placeholder="父标识"></el-input>
                </el-form-item>
                <el-form-item label='备注：'>
                    <el-input placeholder="备注"></el-input>
                </el-form-item>
                <el-form-item label='地址：'>
                    <el-input placeholder="请输入地址"></el-input>
                </el-form-item>
                <el-form-item label='类型：'>
                    <el-radio-group v-model="adminParams.type" size="small">
                        <el-radio-button label="菜单"></el-radio-button>
                        <el-radio-button label="权限"></el-radio-button>
                    </el-radio-group>
                </el-form-item>
            </el-form>
            <span slot="footer" class="dialog-footer">
                <el-button @click='closeModel'>取 消</el-button>
                <el-button type="primary" @click='addAuth'>确 定</el-button>
            </span>
        </el-dialog>
    </div>
</template>
<script>
    export default{
        data(){
            return{
                addAdmin:false,
                adminParams:{
                    icon:'',
                    name:'',
                    parent:'',
                    remark:'',
                    sort:'',
                    type:'',
                    url:'',
                },
            }
        },
        methods: {
            addAdmins(){
                this.addAdmin=true;
            },
            closeModel(){
                this.addAdmin=false;
            },
        }
    }
</script>
<style scoped>
.avatar-uploader .el-upload {
    border: 1px dashed #d9d9d9;
    border-radius: 6px;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}
.avatar-uploader .el-upload:hover {
    border-color: #409EFF;
}
.avatar-uploader-icon {
    font-size: 28px;
    color: #8c939d;
    width: 178px;
    height: 178px;
    line-height: 178px;
    text-align: center;
}
.avatar {
    width: 178px;
    height: 178px;
    display: block;
}
</style>
